html, body {
    width: 300px;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tabs {
    display: flex;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 40px;
}

.tab-button {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: #f0f0f0;
}

.tab-button.active {
    border-bottom: 2px solid #2196F3;
    color: #2196F3;
}

.tab-content {
    display: none;
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    height: calc(100% - 40px);
}

.tab-content.active {
    display: block;
}

.resource-list {
    display: grid;
    gap: 15px;
    padding-bottom: 60px; /* 为底部的下载按钮留出空间 */
}

.resource-item {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-container {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.resource-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    text-align: center;
    padding: 5px;
    background-color: #f0f0f0;
}

.video-preview .preview-placeholder,
.audio-preview .preview-placeholder {
    font-size: 24px;
    color: #2196F3;
}

.resource-info {
    flex: 1;
    min-width: 0;
}

.resource-name {
    margin: 0 0 5px 0;
    font-size: 12px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.resource-details {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #666;
    margin-bottom: 5px;
}

.resource-dimensions,
.resource-duration {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.download-btn {
    padding: 6px 12px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 12px;
}

.download-btn:hover {
    background-color: #1976D2;
}

.download-all {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f5f5f5;
    padding: 10px;
    text-align: center;
    border-top: 1px solid #ddd;
    z-index: 100;
}

.download-all-btn {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 13px;
    width: 90%;
}

.download-all-btn:hover {
    background-color: #388E3C;
}

.no-resources {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #d32f2f;
    font-size: 14px;
    background-color: #ffebee;
    border-radius: 4px;
    margin: 10px 0;
}

@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/materialicons/v140/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}
  
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
} 